import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule


class MzituSpider(CrawlSpider):
    name = 'mzitu'
    # allowed_domains = ['www.xxx.com']
    start_urls = ['https://www.mm618.com/']

    rules = (
        # 主页各个模块的地址
        Rule(LinkExtractor(allow=r'https://www.mm618.com/albums/\d+$'), callback='parse_item', follow=False),
    )

    def parse_item(self, response):
        response.xpath()

    def parse_detail(self, response):
        print('详情页')
        print(response)
